function isValidPhone(str) {
  const myreg = /^[1][0-9][0-9]{9}$/;
  if (!myreg.test(str)) {
    return "号码格式不正确";
  } else {
    return '';
  }
}
function isValidMail(str) {
  const myreg =  /^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/;
  if (!myreg.test(str)) {
    return "邮箱格式不正确";
  } else {
    return '';
  }
}


module.exports = {
  isValidPhone,
  isValidMail,
}
